# Targets:
#
#   build          - Build libapreq1.
#   clean          - Remove generated files.
#
# Make variables:
#
#   APACHE_ROOT    - Apache installation directory.
#   TCL_ROOT       - Tcl installation directory.
#   DEBUG          - If set to 1, build a debug version.

default:	_build

WTCL_SRC_DIR=..

!INCLUDE "../win.def"

# Config

!if "$(CFG)" == ""
!if "$(DEBUG)" == "1"
CFG=libapreq1 - Win32 Debug
!else
CFG=libapreq1 - Win32 Release
!endif
!endif

# Build flags

!IF "$(CFG)" == "libapreq1 - Win32 Debug"

OUTDIR=.\Debug
INTDIR=.\Debug

CPP_PROJ=/nologo /MDd /W3 /GX /Zi /Od /I "$(APACHE_INCLUDE_DIR)" /I "$(TCL_INCLUDE_DIR)" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /D "WTCL" /D "DEBUG" $(TCL_FLAGS) $(LIBAPREQ1_FLAGS) /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapreq1_src" /FD /c

LIB32_FLAGS=/nologo /subsystem:windows /machine:I386 /out:"$(OUTDIR)\libapreq1.lib"

MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32

!ELSE

OUTDIR=.\Release
INTDIR=.\Release

CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "$(APACHE_INCLUDE_DIR)" /I "$(TCL_INCLUDE_DIR)" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /D "WTCL" $(TCL_FLAGS) $(LIBAPREQ1_FLAGS) /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapreq1_src" /FD /c 

LIB32_FLAGS=/nologo /subsystem:windows /machine:I386 /out:"$(OUTDIR)\libapreq1.lib"

MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 

!ENDIF

BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapreq1.bsc" 
BSC32_SBRS= \
	

.c{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.c{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

LIB32_OBJS= \
	"$(INTDIR)\apache_request.obj" \
	"$(INTDIR)\apache_cookie.obj" \
  "$(INTDIR)\apache_multipart_buffer.obj"

"$(OUTDIR)":	
	if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

"$(OUTDIR)\libapreq1.lib": "$(OUTDIR)" $(LIB32_OBJS)
    $(LIB32) @<<
  $(LIB32_FLAGS) $(LIB32_OBJS)
<<

!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("libapreq1.dep")
!INCLUDE "libapreq1.dep"
!ELSE 
!MESSAGE Warning: cannot find "libapreq1.dep"
!ENDIF 
!ENDIF 

SOURCE=apache_request.c
"$(INTDIR)\apache_request.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(SOURCE)

SOURCE=apache_cookie.c
"$(INTDIR)\apacke_cookie.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(SOURCE)

SOURCE=apache_multipart_buffer.c
"$(INTDIR)\apache_multipart_buffer.obj" : $(SOURCE) "$(INTDIR)"
	$(CPP) $(CPP_PROJ) $(SOURCE)

all:	install

install:	_build _install

libapreq1:	_build

build:	_build

_build:	"$(OUTDIR)\libapreq1.lib"

clean:	
	-@rmdir /S /Q "$(INTDIR)"
	-@rmdir /S /Q "$(OUTDIR)"

